package com.itheima.mapper;

import com.itheima.pojo.OrderSetting;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

public interface OrdersettingDao {
    /**
     * 根据预约日期修改可预约人数
     * @param orderSetting
     */
    void editNumberByOrderDate(OrderSetting orderSetting);

    /**
     * 根据预约日期查询预约设置数据
     * @param firstDayOfMonth
     * @param lastDayOfMonth
     * @return
     */
    List<OrderSetting> getOrderSettingByMonth(@Param("begin") LocalDate firstDayOfMonth,@Param("end") LocalDate lastDayOfMonth);

    /**
     * 增加预约设置数据
     * @param orderSetting
     */
    void addOrderSetting(OrderSetting orderSetting);

    /**
     * 根据预约日期查询预约设置数据
     * @param orderDate
     * @return
     */
    OrderSetting getOrderSettingByDate(LocalDate orderDate);

    /**
     * 根据预约日期修改已预约人数
     * @param orderDate
     */
    void editReservationsByOrderDate(LocalDate orderDate);
}
